<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="sam" %>
<script language="javaScript" 
    type="text/javascript" src="datetimepicker.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<% String val=request.getParameter("val");
String accno=request.getParameter("usreid");
if(val==null){
%>


<body>

ADD CUSTOMER FORM!!!
<form name="f1" method="post" action="addCustomerDetails.do">

<table align="center" cellpadding = "10">

<!----- First Name ---------------------------------------------------------->
<tr>
<td> NAME</td>
<td><input type="text" name="name" maxlength="30"/>
(max 30 characters a-z and A-Z)
</td>
</tr>


<tr>
<td>USER ID</td>
<td><input type="text" name="user_id" maxlength="30"/>
(max 30 characters a-z and A-Z)
</td>
</tr>

<!----- Email Id ---------------------------------------------------------->
<tr>


<td>EMAIL ID</td>
<td><input type="text" name="email" maxlength="100" />

    
</td>
</tr>


<tr>
<td>MOBILE NUMBER</td>
<td>
<input type="text" name="telephone" maxlength="10" />
(10 digit number)
</td>
</tr>

<tr>
<td>GENDER</td>
<td>
Male <input type="radio" name="gender" value="Male" />
Female <input type="radio" name="gender" value="Female" />
</td>
</tr>
<td>DOB:<input id="demo1" name="dob" type="text" size="25" >
       
        <a href="javascript:NewCal('demo1','ddmmyyyy')"><img src="cal.gif" width="18" height="18" border="0" alt="Pick a date"></a><br>
    </td>
<!----- Address ---------------------------------------------------------->
<tr>
<td>ADDRESS <br /><br /><br /></td>
<td><textarea name="address" rows="4" cols="30"></textarea></td>
</tr>
<td>City</td>
<td><input type="text" name="city">
<tr>

<td>State</td>
<td><input type="text" name="state">
<tr>
<td>pin no:</td>
<td><input type="text" name="pin_no">
<tr>
<td>fax</td>
<td><input type="text" name="fax">

<td>password<input type="password" name="password">
</td>
</tr>


<tr>
<td colspan="2" align="center">
<input type="submit" onclick="return validate()" value="Submit">



<input type="reset" value="Reset">
</td>
</tr>
</table>
   
  
</form>

<form action="editCustomerDetails.do"  method="post">
<%    
}

else if(val.equals("1"))
{
%>
v a l o f e d i t n u m i s s<%= val %> <br>


<sam:forEach items="${editCust}" var="item" varStatus="sam">

ADD CUSTOMER FORM!!!asdasd	
<form name="f1" method="post" action="Edit.do">
AACC NUM IS <%=accno %>

<input type="hidden" name="accountId" value='<%=accno %>'>
<table align="center" cellpadding = "10">

<!----- First Name ---------------------------------------------------------->
<tr>
<td> NAME</td>
<td><input type="text" name="name" maxlength="30" value="${item.name}"/>
(max 30 characters a-z and A-Z)
</td>
</tr>


<tr>
<td>USER ID</td>
<td><input type="text" name="user_id" value="${item.user_id}" maxlength="30"/>
(max 30 characters a-z and A-Z)
</td>
</tr>

<!----- Email Id ---------------------------------------------------------->
<tr>


<td>EMAIL ID</td>
<td><input type="text" name="email" value="${item.email}" maxlength="100" />

    
</td>
</tr>


<tr>
<td>MOBILE NUMBER</td>
<td>
<input type="text" name="telephone"  value="${item.telephone}" maxlength="10" />
(10 digit number)
</td>
</tr>


<tr>
<td>GENDER</td>
<td>
Male <input type="radio" name="gender" value="Male" />
Female <input type="radio" name="gender" value="Female" />
</td>
</tr>
<td>DOB:<input id="demo1" name="dob" type="text" size="25" >
       
        <a href="javascript:NewCal('demo1','ddmmyyyy')"><img src="cal.gif" width="18" height="18" border="0" alt="Pick a date"></a><br>
    </td>
<!----- Address ---------------------------------------------------------->
<tr>
<td>ADDRESS <br /><br /><br /></td>
<td><textarea name="address" rows="4" cols="30" >"${item.address}"</textarea></td>
</tr>
<td>City</td>
<td><input type="text" name="city" value="${item.city}">
<tr>

<td>STATE</td>
<td><input type="text" name="state" value="${item.state}" >
<tr>
<td>PIN NO:</td>
<td><input type="text" name="pin_no" value="${item.pin_no}">
<tr>
<td>FAX</td>
<td><input type="text" name="fax" value="${item.fax}">

<td>PASSWORD<input type="password" name="password" >
</td>
</tr>
<tr>
<td colspan="2" align="center">
<input type="submit" onclick="return validate()" value="Update">

<input type="reset" value="Reset">

</td>

</tr>
</table>        
  
  </sam:forEach>
  
</form>
<%} %>
</body>
</html>